
#include "stdlib.h"
#include "stdio.h"
#include "string.h"

//结构体的定义
typedef struct _Teacher
{
	char name[62];
	char c;
	int age;
}Teacher ;

//分配结构体数组内存块
//在被调用函数里面分配的内存块 传送不出来
int creatTArray(Teacher *tArray, int num)
{
	tArray = (Teacher *)malloc(num * sizeof(Teacher));
	if (tArray == NULL)
	{
		return -1;
	}
	return 0;
}

void main()
{

	int ret = 0;

	Teacher *pArray = NULL;
	ret = creatTArray(pArray, 3);
	if (ret != 0)
	{
        printf("creatTArray() error");
		return ;
	}

}
